<?php
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=ReporteRubro.xls");

    include_once '../../Model/M_Rubro.php';

    $rubro = new M_Rubro();
    $lista = $rubro->searchRubro_All();
?>
<!DOCTYPE html>
<html>
    <head>
        <title>Mantenimiento Rubro</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
    </head>
    <body style="width: 100%">
         <center>
                  
                  <H2>REPORTE DE RUBRO</H2>
                  </center>
            <table align="center" border='2' width='70%' style='border-collapse: collapse; font-size:8pt' bordercolor='#000000'>
                <thead>
                    <tr align=center bgcolor='#04B431' style='font-weight: bold; text-transform: uppercase'>
                        <th width="10px">Nro.</th>
                        <th width="50px">Nombre</th>
                  
                    </tr>
                </thead>
                <tbody>
                    <?php
                        if(count($lista)>0)
                        {
                            for($i=0;$i<(count($lista));$i++) {
                    ?>
                            <tr>
                                <td><?php echo $i+1 ?></td>
                                <td><?php echo ($lista[$i]['nombre']);?></td>
                                  </tr>
                    <?php
                            }
                        }
                    ?>
                </tbody>
            </table>
        </div>
    </body>
</html>